package com.marshalchen.common.uimodule.imageprocessing.filter.blend;import com.marshalchen.common.uimodule.imageprocessing.filter.MultiInputFilter;/** * Applies an exclusion blend of two images * @author Chris Batt */public class ExclusionBlendFilter extends MultiInputFilter {	public ExclusionBlendFilter() {		super(2);	}		@Override	protected String getFragmentShader() {		return 				 "precision mediump float;\n" 				+"uniform sampler2D "+UNIFORM_TEXTURE0+";\n"  				+"uniform sampler2D "+UNIFORM_TEXTUREBASE+1+";\n" 				+"varying vec2 "+VARYING_TEXCOORD+";\n"							  		+"void main(){\n"		  		+"   vec4 color1 = texture2D("+UNIFORM_TEXTURE0+","+VARYING_TEXCOORD+");\n"		  		+"   vec4 color2 = texture2D("+UNIFORM_TEXTUREBASE+1+","+VARYING_TEXCOORD+");\n"		  		+"   gl_FragColor = vec4((color2.rgb * color1.a + color1.rgb * color2.a - 2.0 * color2.rgb * color1.rgb) + color2.rgb * (1.0 - color1.a) + color1.rgb * (1.0 - color2.a), color1.a);\n"		  		+"}\n";		}}